//
//  ViewController.m
//  First Project
//
//  Created by iD Student on 7/8/13.
//  Copyright (c) 2013 Apple Inc. All rights reserved.
//

#import "ViewController.h"

@implementation ViewController

- (void) didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any rescources that can be recreated.
}

- (IBAction) changeBackgroundColor: (id) sender
{
    UIButton *buttonPressed = (UIButton*) sender;
    
    if (buttonPressed  == redButton)
    {
        [self.view setBackgroundColor:[UIColor redColor]];
    }
    else if(buttonPressed == orangeButton)
    {
        [self.view setBackgroundColor:[UIColor orangeColor]];
    }
    else if(buttonPressed == resetButton)
    {
        [self.view setBackgroundColor:[UIColor grayColor]];
    }
}


#pragma mark - View lifecycle

- (void) viewDidLoad{
    [super viewDidLoad] ;
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)dealloc {
    [resetButton release];
    [super dealloc];
}
@end